/**
* GtkConstraint:relation:
*
- * The relation order between the terms of the constraint.
+ * The order relation between the terms of the constraint.
*/
obj_props[PROP_RELATION] =
g_param_spec_enum ("relation",
return NULL;
}
+/**
+ * gtk_constraint_get_target:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the #GtkConstraintTarget used as the target for @constraint.
+ *
+ * If the #GtkConstraint:target property is set to %NULL, the @constraint
+ * will use the #GtkConstraintLayout's widget.
+ *
+ * Returns: (transfer none) (nullable): a #GtkConstraintTarget
+ */
GtkConstraintTarget *
gtk_constraint_get_target (GtkConstraint *constraint)
{
return constraint->target;
}
+/**
+ * gtk_constraint_get_target_attribute:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the attribute of the target to be set by the @constraint.
+ *
+ * Returns: the target's attribute
+ */
GtkConstraintAttribute
gtk_constraint_get_target_attribute (GtkConstraint *constraint)
{
return NULL;
}
+/**
+ * gtk_constraint_get_source:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the #GtkConstraintTarget used as the source for @constraint.
+ *
+ * If the #GtkConstraint:source property is set to %NULL, the @constraint
+ * will use the #GtkConstraintLayout's widget.
+ *
+ * Returns: (transfer none) (nullable): a #GtkConstraintTarget
+ */
GtkConstraintTarget *
gtk_constraint_get_source (GtkConstraint *constraint)
{
return constraint->source;
}
+/**
+ * gtk_constraint_get_source_attribute:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the attribute of the source to be read by the @constraint.
+ *
+ * Returns: the target's attribute
+ */
GtkConstraintAttribute
gtk_constraint_get_source_attribute (GtkConstraint *constraint)
{
return constraint->source_attribute;
}
+/**
+ * gtk_constraint_get_relation:
+ * @constraint: a #GtkConstraint
+ *
+ * The order relation between the terms of the @constraint.
+ *
+ * Returns: a #GtkConstraintRelation value
+ */
GtkConstraintRelation
gtk_constraint_get_relation (GtkConstraint *constraint)
{
return constraint->relation;
}
+/**
+ * gtk_constraint_get_multiplier:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the multiplication factor applied to the source
+ * attribute's value.
+ *
+ * Returns: a multiplication factor
+ */
double
gtk_constraint_get_multiplier (GtkConstraint *constraint)
{
return constraint->multiplier;
}
+/**
+ * gtk_constraint_get_constant:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the constant factor added to the source attributes' value.
+ *
+ * Returns: a constant factor
+ */
double
gtk_constraint_get_constant (GtkConstraint *constraint)
{
return constraint->constant;
}
+/**
+ * gtk_constraint_get_strength:
+ * @constraint: a #GtkConstraint
+ *
+ * Retrieves the strength of the constraint.
+ *
+ * Returns: the strength of the constraint
+ */
int
gtk_constraint_get_strength (GtkConstraint *constraint)
{